<!--
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: ZJZ
 * @Date: 2021-06-07 14:34:47
 * @LastEditors: 朱江洲
 * @LastEditTime: 2021-11-05 09:20:59
-->
<template>
  <div>
    <el-dialog
      title="开票信息"
      :visible.sync="dialog.dialogShowBilling"
      width="70%"
      custom-class="dialogClass"
      :close-on-click-modal="false"
    >
      <el-form
        :model="billingFrom"
        ref="billingFrom"
        :rules="billingRules"
        label-position="top"
      >
        <el-form-item label="总金额" prop="money">
          <el-input
            v-model="billingFrom.money"
            disabled
            style="width: 330px"
          ></el-input>
        </el-form-item>
        <el-form-item label="详情" prop="detail">
          <el-input
            v-model="billingFrom.detail"
            style="width: 330px"
          ></el-input>
        </el-form-item>
        <el-form-item label="公司名称" prop="company">
          <el-input
            v-model="billingFrom.company"
            style="width: 330px"
          ></el-input>
        </el-form-item>
        <el-form-item label="纳税人识别号" prop="taxes">
          <el-input v-model="billingFrom.taxes" style="width: 330px"></el-input>
        </el-form-item>
        <el-form-item label="单位地址">
          <el-input
            v-model="billingFrom.address"
            style="width: 330px"
          ></el-input>
        </el-form-item>
        <el-form-item label="电话号码">
          <el-input v-model="billingFrom.phone" style="width: 330px"></el-input>
        </el-form-item>
        <el-form-item label="开户银行">
          <el-input v-model="billingFrom.bank" style="width: 330px"></el-input>
        </el-form-item>
        <el-form-item label="银行账号">
          <el-input
            v-model="billingFrom.account"
            style="width: 330px"
          ></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer">
        <el-button @click="dialog.dialogShowBilling = false">取消</el-button>
        <el-button type="primary" @click="">保存</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    dialog: {
      type: Object,
      required: true,
    },
  },
  data() {
    return {
      billingRules: {
        money: [{ required: true }],
        detail: [
          {
            required: true,
            message: "请输入详情",
            trigger: "blur",
          },
        ],
        company: [
          {
            required: true,
            message: "请输入公司名称",
            trigger: "blur",
          },
        ],
        taxes: [
          {
            required: true,
            message: "请输入纳税人识别号",
            trigger: "blur",
          },
        ],
      },
      billingFrom: {
        money: "",
        detail: "",
        company: "",
        taxes: "",
        address: "",
        phone: "",
        bank: "",
        account: "",
      },
    };
  },
};
</script>

<style lang="less" scoped>
.el-form {
  margin-top: 40px;
  padding-left: 72px;
  display: flex;
  flex-wrap: wrap;
  .el-form-item {
    margin-right: 65px;
  }
}
/deep/ .el-dialog__wrapper {
  left: 80px;
}
</style>